home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Stolen Data 3
/
Stolen Data 3.adf
/
MAG-TEXT
/
CODE4b
< prev
next >
Wrap
Text File
|
1989-01-01
|
1KB
|
31 lines
it is to be displayed is only 46 bytes
across you must tell the video chip to
skip 34 bytes after displaying every
line. This is accomplished through
setting the Modulo values to 34. For
more information see the relevant
manual ( Systems Guide or Hardware
reference.)
Taking the above example a little
further (the included source is based
on this) we will consider how to write
such a double buffered scroller. We
can only traverse 34 bytes (272 pixels)
before the buffer runs out, so we must
swap buffers before then. A counter is
incremented with the scrolling speed
every frame, and this is then converted
into bitplane pointers and hardware
scrolling registers. If the counter
exceeds a certain limit (In my case 256
pixels) which MUST be less than the 272
pixel range we calculated earlier, then
the limit is subtracted from the
counter. At the same time the two
buffers are swapped. I think an
example will explain this better
eg. (following the convention for
variables I mentioned earlier in the RS
opcode discussion)